Visual Basic (Declaration) | |
---|---|
Public Overloads Function MakeBitmap( _ ByVal bmpsize As Size, _ ByVal dpi As Double, _ ByVal viewpos As Point, _ ByVal scale As Double, _ ByVal act As Action(Of BitmapSource) _ ) As BitmapSource |
C# | |
---|---|
public BitmapSource MakeBitmap( Size bmpsize, double dpi, Point viewpos, double scale, Action<BitmapSource> act ) |
Parameters
- bmpsize
- the size of the resulting bitmap, rounded up to the nearest integer
- dpi
- bitmap resolution [ignored in Silverlight]
- viewpos
- a
Point
in model coordinates for the top-left corner of the area to be rendered - scale
- a value of 1.0 is normal; the value must be a positive number. Smaller values produce smaller-looking parts.
- act
- an
Action
taking theBitmapSource
to be performed later; this may be null
Return Value
aBitmapSource
; in Silverlight the contents may not have been rendered until a later timeThe diagram must already be visible and fully initialized before this method is able to render anything.
In Silverlight the rendering of the contents of the bitmap occurs asynchronously. Although a BitmapSource
is returned immediately, it will not immediately contain the expected bits. You may access the bitmap contents in the act action or thereafter. In Silverlight any background GridPattern is not rendered.